const IPV4_ADDRESS = getIPAdress()
// const path = require('path')
function getIPAdress() {
  var interfaces = require('os').networkInterfaces()
  for (var devName in interfaces) {
    var iface = interfaces[devName]
    for (var i = 0; i < iface.length; i++) {
      var alias = iface[i]
      if (alias.family === 'IPv4' && alias.address !== '127.0.0.1' && !alias.internal) {
        return alias.address
      }
    }
  }
}
// function Resolve(absolutePath = '') {
//   return path.resolve(__dirname, absolutePath)
// }
const CONFIG = {
  host: IPV4_ADDRESS,
  port: 8088,
  autoOpenBrowser: true,
  // 代理配置
  proxyTable: {
    // 退车app
    '/api': {
      target: 'http://www.doclever.cn:8090/mock/5c2593d056ccf40a7f0a80e3/',
      secure: false,
      changeOrigin: true,
      pathRewrite: {
        '^/api': ''
      }
    }
  }
//   staticPath: Resolve('../../client/static')
}
module.exports = CONFIG
